<?php
require('../conn.php');
require('../functions.php');
if($_POST){
      $value=$_POST['value']-1;
     $row=$mysql->query("select number,name from codedata where type=$value");

    if($row){
        echo json_encode($row);
    }else{
        echo 0;
    }
}